    <?php

/**
 * Description of MoneyFactoryclass
 *
 * @author perrine
 */
require_once("Money.class.php");
class MoneyFactory {
    
    private static $_defaultCurrencies;

    public static $_currencies;

    private static $_defaultInstance;

    public static function getDefaultFactory() {
    	if (!isset($_defaultInstance)){
    		MoneyFactory::$_defaultInstance=new MoneyFactory();
            MoneyFactory::$_currencies = array("EUR","USD","CHF");
        }
        
        return MoneyFactory::$_defaultInstance;
    }

    public function getCurrencies(){
        return MoneyFactory::$_currencies;
    }

    public function createMoney($v,$curr) {
        return new Money($v,$curr);
    }

    public function addCurrencie($currencie)
    {
        $_currencies.add(currencie);
    }


}
?>
